
using System;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
 // ERROR: Not supported in C#: OptionDeclaration
namespace NCS_CS
{
	internal partial class FrmLoadmethod : System.Windows.Forms.Form
	{
		public bool mconfirm;
		public string methodname;

		public int methodid;
		private void Command1_Click(System.Object eventSender, System.EventArgs eventArgs)
		{
			if ((DataGrid1.CurrentRow != null)) {
				mconfirm = true;
				methodname =Convert.ToString(  DataGrid1.CurrentRow.Cells["cname"].Value);
				methodid = (int)DataGrid1.CurrentRow.Cells["id"].Value;
				this.Visible = false;
			}
			//End If
			//Unload Me
		}


		private void FrmLoadmethod_Load(System.Object eventSender, System.EventArgs eventArgs)
		{
			IList o = null;
			o = ModMain.getsession().CreateSQLQuery("select * from method where cuser='" + Convert.ToString(ModMain.user1.mname) + "'").AddEntity(typeof(NCS.method)).List();
			this.DataGrid1.DataSource = o;
			foreach (DataGridViewColumn col in DataGrid1.Columns) {
				col.Visible = false;
			}
			if (o.Count < 1)
				return;
            this.DataGrid1.Columns["cname"].Visible = true;
            this.DataGrid1.Columns["id"].Visible = true;

		}

	}
}
